package com.pm.common;

import com.pm.common.exception.ExpCodeState;

public class OperationCommon {
    public static Response<Integer> getIntegerRemoveResponse(int row) {
        Response<Integer> response = null;
        if (row==1) {
            response = new Response<Integer>(ExpCodeState.remove_data_success, row);
        } else {
            response = new Response<Integer>(ExpCodeState.remove_data_failed);
        }
        return response;
    }

    public static Response<Integer> getIntegerUpdateResponse(int row) {
        Response<Integer> response = null;
        if (row==1) {
            response = new Response<Integer>(ExpCodeState.update_data_success, row);
        } else {
            response = new Response<Integer>(ExpCodeState.update_data_failed);
        }
        return response;
    }

    public static Response<Integer> getIntegerAddResponse(int row) {
        Response<Integer> response = null;
        if (row==1) {
            response = new Response<Integer>(ExpCodeState.add_data_success, row);
        } else {
            response = new Response<Integer>(ExpCodeState.add_data_failed);
        }
        return response;
    }
}
